package com.localjoycommunity.cpdj.project.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.localjoycommunity.cpdj.framework.aspectj.lang.annotation.Excel;
import com.localjoycommunity.cpdj.framework.web.domain.BaseEntity;
import com.localjoycommunity.cpdj.project.system.domain.vo.UserAnswerVo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 【请填写功能名称】对象 user
 *
 * @author leepandar
 * @date 2020-10-29
 */
public class User extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    @Excel(name = "用户名")
    private String name;

    /**
     * $column.columnComment
     */
    @Excel(name = "手机号")
    @NotBlank(message = "手机号不能为空")
    private String phone;

    /**
     * $column.columnComment
     */
//    @Excel(name = "用户名")
    private String openid;

    /**
     * 0-女 1-男
     */
    @Excel(name = "0-女 1-男")
    private Integer sex;

    /**
     * 党支部
     */
    @Excel(name = "党支部")
    private String party;

    /**
     * $column.columnComment
     */
    /** $column.columnComment */
    // @JsonIgnore
//    @Excel(name = "密码")
    @NotBlank(message = "密码不能为空")
    private String password;

    /**
     * 党委
     */
    @Excel(name = "党委")
    private String committee;

    /**
     * $column.columnComment
     */
    @Excel(name = "年龄")
    private Integer age;

    /**
     * 政治面貌
     */
    @Excel(name = "政治面貌")
    private Integer politicStatus;

    /**
     * 点赞总数
     */
    @Excel(name = "点赞总数")
    private Long digNum;

    /**
     * 收藏总数
     */
    @Excel(name = "收藏总数")
    private Long collectNum;

    /**
     * $column.columnComment
     */
    @Excel(name = "心愿总数")
    private Long wishNum;

    /**
     * $column.columnComment
     */
    @Excel(name = "活动总数")
    private Long activityNum;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date birth;

    // 短信验证码
    @TableField(exist = false)
    private String code;


    /**
     * 地址
     */
    @Excel(name = "地址")
    private String address;

    private String avatar;

    @Excel(name = "作答试卷数")
    @TableField(exist = false)
    private Integer paperNum;
    @Excel(name = "答题总数")
    @TableField(exist = false)
    private Integer answerNum;
    @Excel(name = "对题数")
    @TableField(exist = false)
    private Integer correctNum;
    @Excel(name = "错题数")
    @TableField(exist = false)
    private Integer wrongNum;
    @Excel(name = "总得分")
    @TableField(exist = false)
    private Integer scoreTotal;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getParty() {
        return party;
    }

    public void setParty(String party) {
        this.party = party;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCommittee() {
        return committee;
    }

    public void setCommittee(String committee) {
        this.committee = committee;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getPoliticStatus() {
        return politicStatus;
    }

    public void setPoliticStatus(Integer politicStatus) {
        this.politicStatus = politicStatus;
    }

    public Long getDigNum() {
        return digNum;
    }

    public void setDigNum(Long digNum) {
        this.digNum = digNum;
    }

    public Long getCollectNum() {
        return collectNum;
    }

    public void setCollectNum(Long collectNum) {
        this.collectNum = collectNum;
    }

    public Long getWishNum() {
        return wishNum;
    }

    public void setWishNum(Long wishNum) {
        this.wishNum = wishNum;
    }

    public Long getActivityNum() {
        return activityNum;
    }

    public void setActivityNum(Long activityNum) {
        this.activityNum = activityNum;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Integer getPaperNum() {
        return paperNum;
    }

    public void setPaperNum(Integer paperNum) {
        this.paperNum = paperNum;
    }

    public Integer getAnswerNum() {
        return answerNum;
    }

    public void setAnswerNum(Integer answerNum) {
        this.answerNum = answerNum;
    }

    public Integer getCorrectNum() {
        return correctNum;
    }

    public void setCorrectNum(Integer correctNum) {
        this.correctNum = correctNum;
    }

    public Integer getWrongNum() {
        return wrongNum;
    }

    public void setWrongNum(Integer wrongNum) {
        this.wrongNum = wrongNum;
    }

    public Integer getScoreTotal() {
        return scoreTotal;
    }

    public void setScoreTotal(Integer scoreTotal) {
        this.scoreTotal = scoreTotal;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("phone", getPhone())
                .append("openid", getOpenid())
                .append("sex", getSex())
                .append("party", getParty())
                .append("password", getPassword())
                .append("committee", getCommittee())
                .append("age", getAge())
                .append("politicStatus", getPoliticStatus())
                .append("createTime", getCreateTime())
                .append("digNum", getDigNum())
                .append("collectNum", getCollectNum())
                .append("wishNum", getWishNum())
                .append("activityNum", getActivityNum())
                .append("birth", getBirth())
                .append("address", getAddress())
                .toString();
    }
}
